home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / jazlib.arc / JZDSKFRE.C < prev    next >
Text File  |  1988-12-18  |  920b  |  26 lines

  1. /*
  2. ┌────────────────────────────────────────────────────────────────────────────┐
  3. │jzdskfre.c                                                                  │
  4. │Purpose: Return FAT information regarding disk space and allocation.        │
  5. │See dirlst.dmo for examples                                                 │
  6. │                                                                            │
  7. │ (C) JazSoft Software by Jack A. Zucker (301) 794-5950                      │
  8. └────────────────────────────────────────────────────────────────────────────┘
  9. */
  10.  
  11. jzdskfre (ffat , fdrive )
  12. TFAT *ffat;
  13. int fdrive;
  14. {
  15.   union REGS winreg,woutreg;
  16.  
  17.   winreg.h.ah = 0x36;
  18.   winreg.h.dl = fdrive;
  19.  
  20.   intdos(&winreg,&woutreg);
  21.  
  22.   ffat->free = (long) woutreg.x.ax * woutreg.x.bx * woutreg.x.cx;
  23.   ffat->total = (long) woutreg.x.ax * woutreg.x.cx * woutreg.x.dx;
  24.   ffat->used = ffat->total - ffat->free;
  25. }
  26.